#ifndef _SPRITE_MANAGER_H_
#define _SPRITE_MANAGER_H_

#ifdef _WIN32
#pragma once
#endif

/**
 * 03.04.12 - Steven Hartin - Original Creation
 */

#include <map>
#include <string>

#include "sprite.h"
#include "texture.h"
#include "texturecontainer.h"

using std::string;
using std::map;

class CSpriteManager
{
public:
    static CSpriteManager *getInstance();

    CSprite* addSprite(const string &szSpriteName, const string &szTextureName,
                       int nWidth=D3DPOOL_DEFAULT, int nHeight=D3DPOOL_DEFAULT);
    CSprite* addSprite(const string &szSpriteName, CTexture *pTexture);
    CSprite *getSprite(const string &szSpriteName) const;
    bool removeSprite(const string &szSpriteName);
    bool hasSprite(const string &szSpriteName) const;

    void render();

private:
    CSpriteManager() {}
    ~CSpriteManager();
    CSpriteManager(const CSpriteManager &other) {}
    const CSpriteManager &operator=(const CSpriteManager &other) {}

    map<string, CSprite*> m_arrSprites;
};

#endif